import request from '../utils/request';
import {service_host} from './config';

export async function addProject(params) {
    return request(`${service_host}/project/add`, {
        method: 'POST',
        body: params
    });
}

export async function deleteProject(id) {
    return request(`${service_host}/project/delete`, {
        method: 'DELETE',
        body: {id: id}
    });
}

export async function updateProject(params) {
    return request(`${service_host}/project/update`, {
        method: 'POST',
        body: params
    });
}

export async function queryProjectInfo(id) {
    return request(`${service_host}/project/info`, {
        method: 'POST',
        body: {id: id}
    });
}


export async function queryProjectList() {
    return request(`${service_host}/project/list`, {
        method: 'GET'
    });
}

export async function queryVersionsByProject(params) {
    return request(`${service_host}/project/versionlist`, {
        method: 'POST',
        body: params
    });
}

export async function queryCurrentUserOwnedProjects(params) {
    return request(`${service_host}/project/queryCurrentUserOwnedProjects`, {
        method: 'POST',
        body: params
    });
}




